package com.lzp.copyui.rv

import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.base.BaseActivity
import com.lzp.copyui.CommonAdapter
import com.lzp.copyui.databinding.RvFadeActivityBinding

/**
 * @describe:
 * @Author: lixiaopeng
 * @Date: 2021/8/5
 */
class RvFadeActivity : BaseActivity() {

    private val binding by lazy { RvFadeActivityBinding.inflate(layoutInflater) }

    private val adapter = CommonAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(binding.root)
    }

    override fun initView() {
        super.initView()

        binding.rv.apply {
            isVerticalFadingEdgeEnabled = true
            setFadingEdgeLength(500)
            layoutManager = LinearLayoutManager(this@RvFadeActivity)
            adapter = this@RvFadeActivity.adapter
        }
    }

    override fun setListener() {
        super.setListener()
    }

}